package com.maimao.api.order;

import com.maimao.core.model.resp.PageResult;
import com.maimao.core.model.resp.Result;
import com.maimao.model.order.input.CommentStatusUpdateInput;
import com.maimao.model.order.input.CommitOrder;
import com.maimao.model.order.input.OrderSearchInput;
import com.maimao.model.order.vo.OrderShopEx;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2021/1/17 12:46 下午
 */
@Api("订单")
@RequestMapping("/order")
public interface OrderApi {

    @ApiOperation("订单提交")
    public Result<?> commitOrder(CommitOrder commitOrder, BindingResult bindingResult);

    @ApiOperation("查询订单状态")
    Result<?> checkOrder(String orderId);

    @ApiOperation("付款")
    Result<?> pay(Map<String, String> orderData);

    @ApiOperation("当前用户订单列表查询")
    Result<?> userOrderList(OrderSearchInput input, Integer page, Integer size);

    @ApiOperation("当前用户（卖家）订单列表查询")
    Result<?> shopOrderList(OrderSearchInput input, Integer page, Integer size);


    @ApiOperation("删除订单")
    Result<?> delete(Map<String, Long> data);

    @ApiOperation("发货")
    Result<?> delivery(Map<String, Long> data);

    @ApiOperation("确认收货")
    Result<?> receiveGoods(Map<String, Long> data);

    @ApiOperation("修改订单评论状态")
    Result<?> updateComment(CommentStatusUpdateInput input);

    @ApiOperation("查询是否已评论")
    Result<?> commentStatus(CommentStatusUpdateInput input);


}
